package HashMap;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by wangyg 
 * on 2017/6/13 16:40
 */
public class TestArrayList {

	public static void main(String[] args) {
		List<String> list = new ArrayList<String>();
		list.add("123");
		String s = list.get(list.size() - 1);
//		System.out.println(s);
		Object[] objs = new Object[3];
		int i = 2;
		objs[i++] = 3;
		//		System.out.println(objs[0]);
		//		objs[3]=3;
		//ten arrays
		Object[] objects = new Object[10];
		objects[0]=0;
		objects[1]=1;
		objects[2]=2;
		objects[3]=3;
		objects[4]=4;
		for (int j = 0; j < objects.length-1; j++) {
			System.out.println(objects[j]);
		}
//		System.out.println(objects);
		System.out.println("————————————————");
//		test System.arrayCopy
		System.arraycopy(objects,3,objects,5,2);
		objects[3]=9;
		objects[4]=10;
		for (int j = 0; j < objects.length-1; j++) {
			System.out.println(objects[j]);
		}

	}
}
